package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.handler.AuthSchoolItemMapService;
import com.orange.modules.dao.AuthSchoolItemMapRepository;
import com.orange.modules.entity.AuthSchoolItemMap;

@Service
public class AuthSchoolItemMapServiceImpl implements AuthSchoolItemMapService {

	@Autowired
	private AuthSchoolItemMapRepository authSchoolItemMapRepository;
	
	@Override
	public void insertSelfEvaluate(AuthSchoolItemMap asim) throws SQLException {
		authSchoolItemMapRepository.insertSelfEvaluate(asim);
	}

	@Override
	public AuthSchoolItemMap querySchoolItemByItemId(String itemId,String schoolId,String subject)
			throws SQLException {
		AuthSchoolItemMap asim = authSchoolItemMapRepository.querySchoolItemByItemId(itemId,schoolId,subject);
		return asim;
	}

	@Override
	public List<AuthSchoolItemMap> querySchoolItemBySchoolId(String schoolId,
			String loginType,String itemId) throws SQLException {
		// TODO Auto-generated method stub
		List<AuthSchoolItemMap> list = authSchoolItemMapRepository.querySchoolItemBySchoolId(schoolId, loginType, itemId);
		return list;
	}

	@Override
	public List<AuthSchoolItemMap> querySchoolItemBySchoolId(String schoolId,
			String loginType) throws SQLException {
		// TODO Auto-generated method stub
		List<AuthSchoolItemMap> list = authSchoolItemMapRepository.querySchoolItemBySchoolId(schoolId, loginType);
		return list;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthSchoolItemMapService#deleteSelfEvaluate(java.lang.String, java.lang.String)
	 */
	@Override
	public void deleteSelfEvaluate(String itemId ,String schoolId, String subject)
			throws SQLException {
		authSchoolItemMapRepository.deleteSelfEvaluate(itemId,schoolId, subject);
		
	}

}
